pkgname=kjs
pkgver=5.37.0
pkgrel=1
pkgdesc='Support for JS scripting in applications'
arch="all"
url='https://community.kde.org/Frameworks'
license="LGPL"
depends="qt5-qtbase"
makedepends="extra-cmake-modules kdoctools-dev qt5-qtbase-dev"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/portingAids/${pkgname}-${pkgver}.tar.xz"
subpackages="$pkgname-dev $pkgname-doc"

prepare() {
	mkdir -p $srcdir/build
}

build() {
	cd $srcdir/build
	cmake "$srcdir"/${pkgname}-${pkgver} \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DKDE_INSTALL_LIBDIR=lib \
		-DBUILD_TESTING=OFF
	make
}

package() {
	cd $srcdir/build
	make DESTDIR="${pkgdir}" install
}
sha512sums="0cdaa4e8b2d239e3ff53da12220a60e48e11c1e04a777cda53012d1bb3784948aa846f96b81c3aa71b35a5549a549fbee6665b68439fa0f47dc4e47f527a9cf2  kjs-5.37.0.tar.xz"
